package com.example.deertrip;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.deertrip.tools_class.UserStateGet;

public class Worker_main extends AppCompatActivity {
   Button btn_flight;
   Button btn_hotel;
   Button btn_moment;
   Button btn_loginout;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_worker_main);
        btn_flight=findViewById(R.id.manage_flight_button);
        btn_hotel=findViewById(R.id.manage_hotel_button);
        btn_moment=findViewById(R.id.manage_moment_button);
        btn_loginout=findViewById(R.id.manage_loginout);
        listen();
    }

    private void listen() {
        btn_moment.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(Worker_main.this,Manage_Moment_Model.class);
                startActivity(intent);
            }
        });

        btn_hotel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(Worker_main.this,Manage_Hotel_Model.class);
                startActivity(intent);
            }
        });

        btn_flight.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent=new Intent(Worker_main.this,Manage_flight_Model.class);
                startActivity(intent);
            }
        });

        btn_loginout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                UserStateGet userStateGet=new UserStateGet();
                userStateGet.login_out(Worker_main.this);
            }
        });
    }
}